<?php

namespace app\admin\model\seckill;

use think\Model;


class Kill extends Model
{

    

    //数据库
    protected $connection = 'database';
    // 表名
    protected $name = 'kill';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];

    public function goods()
    {
        return $this->belongsTo('app\admin\model\seckill\Goods', 'goods_ids', 'id', [], 'LEFT')->setEagerlyType(0);
    }


    public function activity()
    {
        return $this->belongsTo('app\admin\model\seckill\Activity', 'time_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }
}
